import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;


public class ReaderFromConsole {

	public static void main(String[] args) {
		
		//construcor(object(object(cobject())))  // decorator design pattern 

		System.out.println("Please enter any int value :");
		BufferedReader  br=new BufferedReader(new InputStreamReader(System.in));
		     try {
			String s=	br.readLine();
			System.out.println("you entered :"+ Integer.parseInt(s));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				System.out.println("exception occurred");
			}
		     
		     Scanner scanner=new Scanner(System.in);
		     System.out.println("ener any string value ");
		 String s=    scanner.nextLine();
		     System.out.println(s);
	}
}
